<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="d1"></div>
    <script>
        var div = document.querySelector('#d1');

        div.onclick = function () {
            console.log(100)
        }
        div.onclick = function () {
            console.log(3000)
        }

        div.addEventListener('click', function () {
            console.log(200)
        })
        div.addEventListener('click', function () {
            console.log(400)
        })
        div.addEventListener('click', function () {
            console.log(400)
        })

    </script>
</body>

</html>